import request from '@/config/axios'

export interface JobVO {
  id: number,
  status: number,
}

// 定时触发列表
export const getTimingTriggerPage = async (params: PageParam) => {
  return await request.get({ url: '/earthquake/job/page', params })
}

//一键启用 / 禁用
export const updateStatus = async (id, status) => {
  return await request.put({ url: '/earthquake/job/update-status?id=' + id + '&status=' + status })
}

//删除定时触发
export const deleteJob = async (ids) => {
  return await request.delete({ url: '/earthquake/job/delete', data: ids })
}

// 新增
export const addJob = async (data) => {
  return await request.post({ url: '/earthquake/job/create', data })
}

// 修改
export const updateJob = async (data) => {
  return await request.put({ url: '/earthquake/job/update', data })
}

// 查看
export const getJob = async (id) => {
  return await request.get({ url: '/earthquake/job/get?id=' + id })
}

//删除文件
export const deleteFile = async (id) => {
  return await request.delete({ url: `/att/deleteAttach/${id}` })
}

